approach to find second largest element in array

join shbcf.ru